{% extends "base.html" %}
{% block title %}Subir Archivo{% endblock %}
{% block body %}
    <h2>Subir Archivo</h2>
    {% if error %}<div class=error><strong>Error:</strong> {{ error }}</div>{% endif %}
    <form action="" method=post enctype=multipart/form-data>
        <table>
            <tr>
                <td>(*) Atributo: </td>
                <td><select name="select_atributo">
                    <option value=0>Seleccione un valor</option>
                    {% for atrib in atributos %}
                    <option {% if atrib_actual == atrib.id %} selected="selected" {% endif %} value="{{atrib.id}}">{{atrib.nombre}}</option>
                    {% endfor %}</select>
                </td>
            </tr>
            <tr>
                <td>(*) </td>
                <td><input type=file name=file></td>
            </tr>
        </table>
        <table>
            <tr>(*) Datos requeridos</tr>
            <tr>
                <td><input type=submit name="action" value="Guardar"></td>
                <td><button type=submit name="action" value="Salir">Cancelar</button></td>
            </tr>
        </table>
    </form>
{% endblock %}
